<template>
  <div>
    <h1>三级分类管理</h1>
    <MasterTable :dataList="categories" :columns="columns" />
  </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { fetchCategories3 } from '@/api/master';
import MasterTable from '@/components/MasterTable.vue';

const categories = ref([]);
const columns = [
  { label: 'ID', field: 'id' },
  { label: '分类编码', field: 'categoryCode' },
  { label: '分类名称', field: 'categoryName' }
];
onMounted(async () => {
  categories.value = await fetchCategories3();
});
</script> 